package com.jc.ds.model;

import java.math.BigDecimal;
import java.util.Date;

/**
 * xorder_return_sku
 * @author 
 */
public class XorderReturnSku extends BaseValueObject {
    /**
     * id
     */
    private Long id;

    /**
     * 退款单Id
     */
    private Long xorderReturnId;

    /**
     * SKUId
     */
    private Long skuId;

    /**
     * SKU数量
     */
    private Long skuNum;

    /**
     * SKU单价
     */
    private BigDecimal skuOriginalPrice;

    /**
     * 实付金额
     */
    private BigDecimal subtotalPrice;

    /**
     * 是否删除  'N' 否 'Y' 是
     */
    private String isDelete;

    /**
     * 创建时间
     */
    private Date createTime;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getXorderReturnId() {
        return xorderReturnId;
    }

    public void setXorderReturnId(Long xorderReturnId) {
        this.xorderReturnId = xorderReturnId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getSkuNum() {
        return skuNum;
    }

    public void setSkuNum(Long skuNum) {
        this.skuNum = skuNum;
    }

    public BigDecimal getSkuOriginalPrice() {
        return skuOriginalPrice;
    }

    public void setSkuOriginalPrice(BigDecimal skuOriginalPrice) {
        this.skuOriginalPrice = skuOriginalPrice;
    }

    public BigDecimal getSubtotalPrice() {
        return subtotalPrice;
    }

    public void setSubtotalPrice(BigDecimal subtotalPrice) {
        this.subtotalPrice = subtotalPrice;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByXorderReturnId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by xorder_return_id asc";
            }else{
                this.orderStr = this.orderStr + ",xorder_return_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by xorder_return_id desc";
            }else{
                this.orderStr = this.orderStr + ",xorder_return_id desc";
            }
        }
    }

    public void orderBySkuId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by sku_id asc";
            }else{
                this.orderStr = this.orderStr + ",sku_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by sku_id desc";
            }else{
                this.orderStr = this.orderStr + ",sku_id desc";
            }
        }
    }

    public void orderBySkuNum(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by sku_num asc";
            }else{
                this.orderStr = this.orderStr + ",sku_num asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by sku_num desc";
            }else{
                this.orderStr = this.orderStr + ",sku_num desc";
            }
        }
    }

    public void orderBySkuOriginalPrice(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by sku_original_price asc";
            }else{
                this.orderStr = this.orderStr + ",sku_original_price asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by sku_original_price desc";
            }else{
                this.orderStr = this.orderStr + ",sku_original_price desc";
            }
        }
    }

    public void orderBySubtotalPrice(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by subtotal_price asc";
            }else{
                this.orderStr = this.orderStr + ",subtotal_price asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by subtotal_price desc";
            }else{
                this.orderStr = this.orderStr + ",subtotal_price desc";
            }
        }
    }

    public void orderByIsDelete(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by is_delete asc";
            }else{
                this.orderStr = this.orderStr + ",is_delete asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by is_delete desc";
            }else{
                this.orderStr = this.orderStr + ",is_delete desc";
            }
        }
    }

    public void orderByCreateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by create_time asc";
            }else{
                this.orderStr = this.orderStr + ",create_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by create_time desc";
            }else{
                this.orderStr = this.orderStr + ",create_time desc";
            }
        }
    }
}